﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MemberPoint.Entity.ViewModels.ShopViewModel
{
    public class CreateShopViewModel
    {
        public int S_ID { get; set; }


        [Required(ErrorMessage = "请输入店铺名称")]//必填字段
        [StringLength(maximumLength: 10, MinimumLength = 3, ErrorMessage = "字符长度必须在3-10之间")]//最小字段为3
        [Display(Name = "店铺名称")]
        public string S_Name { get; set; }

        [Required(ErrorMessage = "请输入店铺类型")]
        [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输入正确的数字")]
        [Display(Name = "店铺类型")]
        public int? S_Category { get; set; }

        [Required(ErrorMessage = "请输入联系人")]
        [Display(Name = "联系人")]
        public string S_ContactName { get; set; }

        [Required(ErrorMessage = "请输入联系人电话")]
        [RegularExpression(@"^1[3458][0-9]{9}$", ErrorMessage = "请输入正确的手机号")]
        [Display(Name = "联系人电话")]
        public string S_ContactTel { get; set; }

        [Required(ErrorMessage = "请输入联系人地址")]
        [Display(Name = "联系人地址")]
        public string S_Address { get; set; }

        [Display(Name = "备注")]
        public string S_Remark { get; set; }
    }
}
